import React, {Component} from 'react';
import {
    View,
    Text,
    TouchableOpacity,
} from 'react-native';

import {MapModule} from 'rn-ai-baidu-map'


import {public_Style as styles} from '../../../../styles';

export default class Map_list extends Component {
    render() {
        return (
            <TouchableOpacity style={styles.map_clickout} activeOpacity={1}
                              onPress={() => MapModule.setMark(this.props.detail.latitude, this.props.detail.longitude).then(ret => {
                                  ret.address = this.props.detail.address;
                                  this.props.navigation.state.params.rollback(ret);
                              })}>
                <View>
                    <Text style={styles.map_clicktxt}> {this.props.detail.address} </Text>
                </View>
            </TouchableOpacity>
        )
    }
}